#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main(void)
{
	int length = 0;
	printf("Enter a mesage: ");

	while (getchar() != '\n') {
		length++;
	}

	printf("Your message was %d character(s) long.\n", length);
	return 0;
}